package com.yue.se.generics;

import java.util.ArrayList;

/**
 * 功能描述: TODO <br/>
 * 创建时间: 2016/9/9<br/>
 *
 * @author QiuYang
 */
public class TestGenerics {
    public static void main(String[] args) {
        ArrayList<String> arr1 = new ArrayList<>();
        ArrayList<Integer> arr2 = new ArrayList<>();
        System.out.println(arr1.getClass() + "   " + arr2.getClass() + "         " +  ArrayList.class);

        Object object = "abc";
        System.out.println(object.getClass() + "     " + auotConver(object).getClass());
    }

    private static <T> T auotConver(Object obj){
        return (T)obj;
    }
}
